from app.model import Moji
from util import json, route

bp = route(__name__)

@bp.get("/")
async def index(request):
    # user = await Moji.create(name="New User")
    res = await Moji.all()
    for item in res:
        print(item)

    return json({"msg": "hi index.py"})

@bp.get("/edit")
async def edit(request):
    return {"msg": "hi index.py-->edit"}